{smcl}
{com}{sf}{ul off}{txt}{.-}
       log:  {res}graphs.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res} 9 Jan 2011, 14:59:29

{com}. do "C:\Users\Piotr\AppData\Local\Temp\STD06000000.tmp"
{txt}
{com}. **** DESCRIPTIVE STATISTICS ON MIPT AND ITERATE (appended)
. 
. clear
{txt}
{com}. set memory 20m
{txt}(20480k)

{com}. 
. ************* "ALL" **********
. 
. use MIPT_AllCollapsed.dta
{txt}
{com}. merge using  ITERATE_AllCollapsed.dta
{txt}
{com}. drop _merge
{txt}
{com}. save All_all.dta, replace
{txt}file All_all.dta saved

{com}. merge using  ITERATE_AllCollapsed_success.dta
{txt}
{com}. drop _merge
{txt}
{com}. rename ITERATEsuccess iAllsuccess
{txt}
{com}. 
. 
. * All attacks in all income classes by quarter over 40 yrs
. corr mAll iAll iAllsuccess
{txt}(obs=160)

             {c |}     mAll     iAll iAllsu~s
{hline 13}{c +}{hline 27}
        mAll {c |}{res}   1.0000
        {txt}iAll {c |}{res}   0.5532   1.0000
 {txt}iAllsuccess {c |}{res}   0.5714   0.9536   1.0000

{txt}
{com}. twoway line mAll iAll Quarter, title("Panel 1: All incidents") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(50)300, angle(horizontal) labsize(3)) ytick(0(10)320) saving(All_all.gph, replace)
{res}{txt}(file All_all.gph saved)

{com}. * Differences ITERATE - MIPT
. gen Diff_All = iAll - mAll
{txt}
{com}. twoway line Diff_All Quarter, title("ITERATE-MIPT difference") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ylabel(-80(80)170, angle(horizontal) labsize(3)) ytick(-80(40)160) saving(Diff_All_all.gph, replace)
{res}{txt}(file Diff_All_all.gph saved)

{com}. 
. * Attacks with fatalities in all income classes by quarter:
. corr mFatal iFatal iFatalsuccess
{txt}(obs=160)

             {c |}   mFatal   iFatal iFatal~s
{hline 13}{c +}{hline 27}
      mFatal {c |}{res}   1.0000
      {txt}iFatal {c |}{res}   0.5961   1.0000
{txt}iFatalsucc~s {c |}{res}   0.6084   0.9888   1.0000

{txt}
{com}. twoway line mFatal iFatal Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(10)60, angle(horizontal) labsize(3)) saving(Fatal_all.gph, replace)
{res}{txt}(file Fatal_all.gph saved)

{com}. 
. * Attacks with injuries in all income classes by quarter:
. corr mInj iInj iInjsuccess
{txt}(obs=160)

             {c |}     mInj     iInj iInjsu~s
{hline 13}{c +}{hline 27}
        mInj {c |}{res}   1.0000
        {txt}iInj {c |}{res}   0.5301   1.0000
 {txt}iInjsuccess {c |}{res}   0.5389   0.9861   1.0000

{txt}
{com}. twoway line mInj iInj Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(10)50, angle(horizontal) labsize(3)) saving(Inj_all.gph, replace)
{res}{txt}(file Inj_all.gph saved)

{com}. 
. * Attacks with any casualties (fatalities and injuries) in all income classes by quarter:
. corr mCasualty iCasualty iCasualtysuccess
{txt}(obs=160)

             {c |} mCasua~y iCasua~y iCasua~s
{hline 13}{c +}{hline 27}
   mCasualty {c |}{res}   1.0000
   {txt}iCasualty {c |}{res}   0.5580   1.0000
{txt}iCasualtys~s {c |}{res}   0.5705   0.9891   1.0000

{txt}
{com}. twoway line mCasualty iCasualty Quarter, title("Panel 1: All casualty incidents") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(10)60, angle(horizontal) labsize(3)) saving(Casualty_all.gph, replace)
{res}{txt}(file Casualty_all.gph saved)

{com}. * Differences ITERATE - MIPT
. gen Diff_Casualty = iCasualty - mCasualty
{txt}
{com}. twoway line Diff_Casualty Quarter, title("ITERATE-MIPT difference") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ylabel(-30(30)30, angle(horizontal) labsize(3)) ytick(-30(15)30) saving(Diff_Casualty_all.gph, replace)
{res}{txt}(file Diff_Casualty_all.gph saved)

{com}. 
. * Attacks against US targets:
. corr mUS_Target iUS_Target iUS_Targetsuccess
{txt}(obs=160)

             {c |} mUS_Ta~t iUS_Ta~t iUS_Ta~s
{hline 13}{c +}{hline 27}
  mUS_Target {c |}{res}   1.0000
  {txt}iUS_Target {c |}{res}   0.7029   1.0000
{txt}iUS_Target~s {c |}{res}   0.6939   0.9886   1.0000

{txt}
{com}. twoway line mUS_Target iUS_Target Quarter, title("Panel 1: All incidents against a U.S. Target") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(20)150, angle(horizontal) labsize(3)) saving(UStarget_all.gph, replace)
{res}{txt}(file UStarget_all.gph saved)

{com}. * Differences ITERATE - MIPT
. gen Diff_US_Target= iUS_Target - mUS_Target
{txt}
{com}. twoway line Diff_US_Target Quarter, title("ITERATE-MIPT difference") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ylabel(-25(25)50, angle(horizontal) labsize(3)) ytick(-25(25)50) saving(Diff_US_target_all.gph, replace)
{res}{txt}(file Diff_US_target_all.gph saved)

{com}. 
. 
. * Attacks with US fatalities:
. corr mUSFatal iUSFatal iUSFatalsuccess
{txt}(obs=160)

             {c |} mUSFatal iUSFatal iUSFat~s
{hline 13}{c +}{hline 27}
    mUSFatal {c |}{res}   1.0000
    {txt}iUSFatal {c |}{res}   0.6603   1.0000
{txt}iUSFatalsu~s {c |}{res}   0.6619   0.9992   1.0000

{txt}
{com}. twoway line mUSFatal iUSFatal Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(2)14, angle(horizontal) labsize(3)) saving(USfatal_all.gph, replace)
{res}{txt}(file USfatal_all.gph saved)

{com}. 
. * Attacks with US injuries:
. corr mUSInj iUSInj iUSInjsuccess
{txt}(obs=160)

             {c |}   mUSInj   iUSInj iUSInj~s
{hline 13}{c +}{hline 27}
      mUSInj {c |}{res}   1.0000
      {txt}iUSInj {c |}{res}   0.4413   1.0000
{txt}iUSInjsucc~s {c |}{res}   0.4218   0.9886   1.0000

{txt}
{com}. twoway line mUSInj iUSInj Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(1)13, angle(horizontal) labsize(3)) saving(USinj_all.gph, replace)
{res}{txt}(file USinj_all.gph saved)

{com}. 
. clear
{txt}
{com}. use MIPT_AllCollapsed.dta
{txt}
{com}. merge using  ITERATE_AllCollapsed.dta
{txt}
{com}. drop _merge mInj mFatal mUSFatal mUSInj iFatal iInj  iUSFatal iUSInj
{txt}
{com}. gen FUND=0
{txt}
{com}. replace FUND=1 if Quarter>78
{txt}(113 real changes made)

{com}. gen POST=0
{txt}
{com}. replace POST=1 if Quarter>127
{txt}(64 real changes made)

{com}. gen SEPT=0
{txt}
{com}. replace SEPT=1 if Quarter>165
{txt}(26 real changes made)

{com}. gen Dp=0
{txt}
{com}. replace Dp=1 if Quarter==166
{txt}(1 real change made)

{com}. gen IRAQ=0
{txt}
{com}. replace IRAQ=1 if Quarter>173
{txt}(18 real changes made)

{com}. tsset Quarter
{res}{txt}{col 9}time variable:  {res}{col 25}Quarter, 1968:1 to 2007:4
{txt}{col 17}delta:  {res}1 quarter
{txt}
{com}. save REGRESSION\All_all.dta, replace
{txt}file REGRESSION\All_all.dta saved

{com}. clear
{txt}
{com}. 
. 
. ************** "LICs" *****************
. 
. clear
{txt}
{com}. use MIPT_LICCollapsed.dta
{txt}
{com}. merge using  ITERATE_LICCollapsed.dta
{txt}
{com}. drop _merge
{txt}
{com}. 
. * All attacks in LICs by quarter over 40 yrs
. corr mAll iAll 
{txt}(obs=160)

             {c |}     mAll     iAll
{hline 13}{c +}{hline 18}
        mAll {c |}{res}   1.0000
        {txt}iAll {c |}{res}   0.5239   1.0000

{txt}
{com}. twoway line mAll iAll Quarter, title("Panel 2: LIC incidents") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(20)100, angle(horizontal) labsize(3)) ytick(0(5)100) saving(All_LIC.gph, replace)
{res}{txt}(file All_LIC.gph saved)

{com}. * Differences ITERATE - MIPT
. gen Diff_All = iAll - mAll
{txt}
{com}. twoway line Diff_All Quarter, title("ITERATE-MIPT difference") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ylabel(-20(20)80, angle(horizontal) labsize(3)) ytick(-20(20)90) saving(Diff_All_LIC.gph, replace)
{res}{txt}(file Diff_All_LIC.gph saved)

{com}. 
. * Attacks with fatalities in LICs by quarter:
. corr mFatal iFatal 
{txt}(obs=160)

             {c |}   mFatal   iFatal
{hline 13}{c +}{hline 18}
      mFatal {c |}{res}   1.0000
      {txt}iFatal {c |}{res}   0.5992   1.0000

{txt}
{com}. twoway line mFatal iFatal Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(5)20, angle(horizontal) labsize(3)) saving(Fatal_LIC.gph, replace)
{res}{txt}(file Fatal_LIC.gph saved)

{com}. 
. * Attacks with injuries in LICs by quarter:
. corr mInj iInj
{txt}(obs=160)

             {c |}     mInj     iInj
{hline 13}{c +}{hline 18}
        mInj {c |}{res}   1.0000
        {txt}iInj {c |}{res}   0.5848   1.0000

{txt}
{com}. twoway line mInj iInj Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(5)20, angle(horizontal) labsize(3)) saving(Inj_LIC.gph, replace)
{res}{txt}(file Inj_LIC.gph saved)

{com}. 
. * Attacks with any casualties (fatalities and injuries) in LICs by quarter:
. corr mCasualty iCasualty
{txt}(obs=160)

             {c |} mCasua~y iCasua~y
{hline 13}{c +}{hline 18}
   mCasualty {c |}{res}   1.0000
   {txt}iCasualty {c |}{res}   0.5976   1.0000

{txt}
{com}. twoway line mCasualty iCasualty Quarter, title("Panel 2: LIC casualty incidents") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(5)30, angle(horizontal) labsize(3)) saving(Casualty_LIC.gph, replace)
{res}{txt}(file Casualty_LIC.gph saved)

{com}. * Differences ITERATE - MIPT
. gen Diff_Casualty = iCasualty - mCasualty
{txt}
{com}. twoway line Diff_Casualty Quarter, title("ITERATE-MIPT difference") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ylabel(-10(10)20, angle(horizontal) labsize(3)) ytick(-10(10)20) saving(Diff_Casualty_LIC.gph, replace)
{res}{txt}(file Diff_Casualty_LIC.gph saved)

{com}. 
. * Attacks against US targets in LICs:
. corr mUS_Target iUS_Target 
{txt}(obs=160)

             {c |} mUS_Ta~t iUS_Ta~t
{hline 13}{c +}{hline 18}
  mUS_Target {c |}{res}   1.0000
  {txt}iUS_Target {c |}{res}   0.5949   1.0000

{txt}
{com}. twoway line mUS_Target iUS_Target Quarter, title("Panel 2: LIC incidents against a U.S. Target") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ytick(0(5)35) ylabel(0(10)35, angle(horizontal) labsize(3)) saving(UStarget_LIC.gph, replace)
{res}{txt}(file UStarget_LIC.gph saved)

{com}. * Differences ITERATE - MIPT
. gen Diff_US_Target= iUS_Target - mUS_Target
{txt}
{com}. twoway line Diff_US_Target Quarter, title("ITERATE-MIPT difference") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ylabel(0(10)20, angle(horizontal) labsize(3)) ytick(0(10)20) saving(Diff_US_target_LIC.gph, replace)
{res}{txt}(file Diff_US_target_LIC.gph saved)

{com}. 
. * Attacks with US fatalities in LICs:
. corr mUSFatal iUSFatal
{txt}(obs=160)

             {c |} mUSFatal iUSFatal
{hline 13}{c +}{hline 18}
    mUSFatal {c |}{res}   1.0000
    {txt}iUSFatal {c |}{res}   0.4263   1.0000

{txt}
{com}. twoway line mUSFatal iUSFatal Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(2)10, angle(horizontal) labsize(3)) saving(USfatal_LIC.gph, replace)
{res}{txt}(file USfatal_LIC.gph saved)

{com}. 
. * Attacks with US injuries in LICs:
. corr mUSInj iUSInj 
{txt}(obs=160)

             {c |}   mUSInj   iUSInj
{hline 13}{c +}{hline 18}
      mUSInj {c |}{res}   1.0000
      {txt}iUSInj {c |}{res}   0.4489   1.0000

{txt}
{com}. twoway line mUSInj iUSInj Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(1)13, angle(horizontal) labsize(3)) saving(USinj_LIC.gph, replace)
{res}{txt}(file USinj_LIC.gph saved)

{com}. 
. drop mInj mFatal mUSFatal mUSInj iFatal iInj  iUSFatal iUSInj
{txt}
{com}. gen FUND=0
{txt}
{com}. replace FUND=1 if Quarter>78
{txt}(113 real changes made)

{com}. gen POST=0
{txt}
{com}. replace POST=1 if Quarter>127
{txt}(64 real changes made)

{com}. gen SEPT=0
{txt}
{com}. replace SEPT=1 if Quarter>165
{txt}(26 real changes made)

{com}. gen Dp=0
{txt}
{com}. replace Dp=1 if Quarter==166
{txt}(1 real change made)

{com}. gen IRAQ=0
{txt}
{com}. replace IRAQ=1 if Quarter>173
{txt}(18 real changes made)

{com}. tsset Quarter
{res}{txt}{col 9}time variable:  {res}{col 25}Quarter, 1968:1 to 2007:4
{txt}{col 17}delta:  {res}1 quarter
{txt}
{com}. save REGRESSION\LIC_all.dta, replace
{txt}file REGRESSION\LIC_all.dta saved

{com}. 
. 
. ************** "MICs" *****************
. 
. clear
{txt}
{com}. use MIPT_MICCollapsed.dta
{txt}
{com}. merge using  ITERATE_MICCollapsed.dta
{txt}
{com}. drop _merge
{txt}
{com}. 
. * All attacks in MICs by quarter over 40 yrs
. corr mAll iAll 
{txt}(obs=160)

             {c |}     mAll     iAll
{hline 13}{c +}{hline 18}
        mAll {c |}{res}   1.0000
        {txt}iAll {c |}{res}   0.6747   1.0000

{txt}
{com}. twoway line mAll iAll Quarter, title("Panel 3: MIC incidents") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(20)200, angle(horizontal) labsize(3)) ytick(0(10)210) saving(All_MIC.gph, replace)
{res}{txt}(file All_MIC.gph saved)

{com}. * Differences ITERATE - MIPT
. gen Diff_All = iAll - mAll
{txt}
{com}. twoway line Diff_All Quarter, title("ITERATE-MIPT difference") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ylabel(-60(30)60, angle(horizontal) labsize(3)) ytick(-60(15)60) saving(Diff_All_MIC.gph, replace)
{res}{txt}(file Diff_All_MIC.gph saved)

{com}. 
. * Attacks with fatalities in MICs by quarter:
. corr mFatal iFatal 
{txt}(obs=160)

             {c |}   mFatal   iFatal
{hline 13}{c +}{hline 18}
      mFatal {c |}{res}   1.0000
      {txt}iFatal {c |}{res}   0.6343   1.0000

{txt}
{com}. twoway line mFatal iFatal Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(10)50, angle(horizontal) labsize(3)) saving(Fatal_MIC.gph, replace)
{res}{txt}(file Fatal_MIC.gph saved)

{com}. 
. * Attacks with injuries in MICs by quarter:
. corr mInj iInj
{txt}(obs=160)

             {c |}     mInj     iInj
{hline 13}{c +}{hline 18}
        mInj {c |}{res}   1.0000
        {txt}iInj {c |}{res}   0.5792   1.0000

{txt}
{com}. twoway line mInj iInj Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(5)25, angle(horizontal) labsize(3)) saving(Inj_MIC.gph, replace)
{res}{txt}(file Inj_MIC.gph saved)

{com}. 
. * Attacks with any casualties (fatalities and injuries) in MICs by quarter:
. corr mCasualty iCasualty
{txt}(obs=160)

             {c |} mCasua~y iCasua~y
{hline 13}{c +}{hline 18}
   mCasualty {c |}{res}   1.0000
   {txt}iCasualty {c |}{res}   0.6043   1.0000

{txt}
{com}. twoway line mCasualty iCasualty Quarter, title("Panel 3: MIC casualty incidents") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(10)60, angle(horizontal) labsize(3)) saving(Casualty_MIC.gph, replace)
{res}{txt}(file Casualty_MIC.gph saved)

{com}. * Differences ITERATE - MIPT
. gen Diff_Casualty = iCasualty - mCasualty
{txt}
{com}. twoway line Diff_Casualty Quarter, title("ITERATE-MIPT difference") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ylabel(-30(10)20, angle(horizontal) labsize(3)) ytick(-30(10)20) saving(Diff_Casualty_MIC.gph, replace)
{res}{txt}(file Diff_Casualty_MIC.gph saved)

{com}. 
. * Attacks against US targets in MICs:
. corr mUS_Target iUS_Target 
{txt}(obs=160)

             {c |} mUS_Ta~t iUS_Ta~t
{hline 13}{c +}{hline 18}
  mUS_Target {c |}{res}   1.0000
  {txt}iUS_Target {c |}{res}   0.6872   1.0000

{txt}
{com}. twoway line mUS_Target iUS_Target Quarter, title("Panel 3: MIC incidents against a U.S. target") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(10)100, angle(horizontal) labsize(3)) saving(UStarget_MIC.gph, replace)
{res}{txt}(file UStarget_MIC.gph saved)

{com}. * Differences ITERATE - MIPT
. gen Diff_US_Target= iUS_Target - mUS_Target
{txt}
{com}. twoway line Diff_US_Target Quarter, title("ITERATE-MIPT difference") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ylabel(-20(20)40, angle(horizontal) labsize(3)) ytick(-30(10)40) saving(Diff_US_target_MIC.gph, replace)
{res}{txt}(file Diff_US_target_MIC.gph saved)

{com}. 
. * Attacks with US fatalities in MICs:
. corr mUSFatal iUSFatal
{txt}(obs=160)

             {c |} mUSFatal iUSFatal
{hline 13}{c +}{hline 18}
    mUSFatal {c |}{res}   1.0000
    {txt}iUSFatal {c |}{res}   0.7176   1.0000

{txt}
{com}. twoway line mUSFatal iUSFatal Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(2)10, angle(horizontal) labsize(3)) saving(USfatal_MIC.gph, replace)
{res}{txt}(file USfatal_MIC.gph saved)

{com}. 
. * Attacks with US injuries in MICs:
. corr mUSInj iUSInj 
{txt}(obs=160)

             {c |}   mUSInj   iUSInj
{hline 13}{c +}{hline 18}
      mUSInj {c |}{res}   1.0000
      {txt}iUSInj {c |}{res}   0.5448   1.0000

{txt}
{com}. twoway line mUSInj iUSInj Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(2)10, angle(horizontal) labsize(3)) saving(USinj_MIC.gph, replace)
{res}{txt}(file USinj_MIC.gph saved)

{com}. 
. drop mInj mFatal mUSFatal mUSInj iFatal iInj  iUSFatal iUSInj
{txt}
{com}. gen FUND=0
{txt}
{com}. replace FUND=1 if Quarter>78
{txt}(113 real changes made)

{com}. gen POST=0
{txt}
{com}. replace POST=1 if Quarter>127
{txt}(64 real changes made)

{com}. gen SEPT=0
{txt}
{com}. replace SEPT=1 if Quarter>165
{txt}(26 real changes made)

{com}. gen Dp=0
{txt}
{com}. replace Dp=1 if Quarter==166
{txt}(1 real change made)

{com}. gen IRAQ=0
{txt}
{com}. replace IRAQ=1 if Quarter>173
{txt}(18 real changes made)

{com}. tsset Quarter
{res}{txt}{col 9}time variable:  {res}{col 25}Quarter, 1968:1 to 2007:4
{txt}{col 17}delta:  {res}1 quarter
{txt}
{com}. save REGRESSION\MIC_all.dta, replace
{txt}file REGRESSION\MIC_all.dta saved

{com}. 
. 
. ************** "HICs" *****************
. 
. clear
{txt}
{com}. use MIPT_HICCollapsed.dta
{txt}
{com}. merge using  ITERATE_HICCollapsed.dta
{txt}
{com}. drop _merge
{txt}
{com}. 
. * All attacks in HICs by quarter over 40 yrs
. corr mAll iAll 
{txt}(obs=160)

             {c |}     mAll     iAll
{hline 13}{c +}{hline 18}
        mAll {c |}{res}   1.0000
        {txt}iAll {c |}{res}   0.4639   1.0000

{txt}
{com}. twoway line mAll iAll Quarter, title("Panel 4: HIC incidents") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(20)180, angle(horizontal) labsize(3)) ytick(0(10)180) saving(All_HIC.gph, replace)
{res}{txt}(file All_HIC.gph saved)

{com}. * Differences ITERATE - MIPT
. gen Diff_All = iAll - mAll
{txt}
{com}. twoway line Diff_All Quarter, title("ITERATE-MIPT difference") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ylabel(-60(60)140, angle(horizontal) labsize(3)) ytick(-60(30)120) saving(Diff_All_HIC.gph, replace)
{res}{txt}(file Diff_All_HIC.gph saved)

{com}. 
. * Attacks with fatalities in HICs by quarter:
. corr mFatal iFatal 
{txt}(obs=160)

             {c |}   mFatal   iFatal
{hline 13}{c +}{hline 18}
      mFatal {c |}{res}   1.0000
      {txt}iFatal {c |}{res}   0.5568   1.0000

{txt}
{com}. twoway line mFatal iFatal Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(5)25, angle(horizontal) labsize(3)) saving(Fatal_HIC.gph, replace)
{res}{txt}(file Fatal_HIC.gph saved)

{com}. 
. * Attacks with injuries in HICs by quarter:
. corr mInj iInj
{txt}(obs=160)

             {c |}     mInj     iInj
{hline 13}{c +}{hline 18}
        mInj {c |}{res}   1.0000
        {txt}iInj {c |}{res}   0.5041   1.0000

{txt}
{com}. twoway line mInj iInj Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(5)25, angle(horizontal) labsize(3)) saving(Inj_HIC.gph, replace)
{res}{txt}(file Inj_HIC.gph saved)

{com}. 
. * Attacks with any casualties (fatalities and injuries) in HICs by quarter:
. corr mCasualty iCasualty
{txt}(obs=160)

             {c |} mCasua~y iCasua~y
{hline 13}{c +}{hline 18}
   mCasualty {c |}{res}   1.0000
   {txt}iCasualty {c |}{res}   0.5737   1.0000

{txt}
{com}. twoway line mCasualty iCasualty Quarter, title("Panel 4: HIC casualty incidents") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(5)30, angle(horizontal) labsize(3)) saving(Casualty_HIC.gph, replace)
{res}{txt}(file Casualty_HIC.gph saved)

{com}. * Differences ITERATE - MIPT
. gen Diff_Casualty = iCasualty - mCasualty
{txt}
{com}. twoway line Diff_Casualty Quarter, title("ITERATE-MIPT difference") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ylabel(-20(20)20, angle(horizontal) labsize(3)) ytick(-20(10)20) saving(Diff_Casualty_HIC.gph, replace)
{res}{txt}(file Diff_Casualty_HIC.gph saved)

{com}. 
. * Attacks against US targets in HICs:
. corr mUS_Target iUS_Target 
{txt}(obs=160)

             {c |} mUS_Ta~t iUS_Ta~t
{hline 13}{c +}{hline 18}
  mUS_Target {c |}{res}   1.0000
  {txt}iUS_Target {c |}{res}   0.6670   1.0000

{txt}
{com}. twoway line mUS_Target iUS_Target Quarter, title("Panel 4: HIC incidents against a U.S. target") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ytick(0(5)35) ylabel(0(10)35, angle(horizontal) labsize(3)) saving(UStarget_HIC.gph, replace)
{res}{txt}(file UStarget_HIC.gph saved)

{com}. * Differences ITERATE - MIPT
. gen Diff_US_Target= iUS_Target - mUS_Target
{txt}
{com}. twoway line Diff_US_Target Quarter, title("ITERATE-MIPT difference") legend(off) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ylabel(-10(10)20, angle(horizontal) labsize(3)) ytick(-10(10)20) saving(Diff_US_target_HIC.gph, replace)
{res}{txt}(file Diff_US_target_HIC.gph saved)

{com}. 
. * Attacks with US fatalities in HICs:
. corr mUSFatal iUSFatal
{txt}(obs=160)

             {c |} mUSFatal iUSFatal
{hline 13}{c +}{hline 18}
    mUSFatal {c |}{res}   1.0000
    {txt}iUSFatal {c |}{res}   0.6113   1.0000

{txt}
{com}. twoway line mUSFatal iUSFatal Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(2)10, angle(horizontal) labsize(3)) saving(USfatal_HIC.gph, replace)
{res}{txt}(file USfatal_HIC.gph saved)

{com}. 
. * Attacks with US injuries in HICs:
. corr mUSInj iUSInj 
{txt}(obs=160)

             {c |}   mUSInj   iUSInj
{hline 13}{c +}{hline 18}
      mUSInj {c |}{res}   1.0000
      {txt}iUSInj {c |}{res}   0.4216   1.0000

{txt}
{com}. twoway line mUSInj iUSInj Quarter, legend(label(1 "MIPT") label(2 "ITERATE")) ttick(1968q1(4)2007q1) tlabel(1968q1(12)2007q1, format(%tqCCYY) labsize(3)) tmtick(1968q3(4)2007q4) ytitle("Incidents per quarter") ylabel(0(2)10, angle(horizontal) labsize(3)) saving(USinj_HIC.gph, replace)
{res}{txt}(file USinj_HIC.gph saved)

{com}. 
. drop mInj mFatal mUSFatal mUSInj iFatal iInj  iUSFatal iUSInj
{txt}
{com}. gen FUND=0
{txt}
{com}. replace FUND=1 if Quarter>78
{txt}(113 real changes made)

{com}. gen POST=0
{txt}
{com}. replace POST=1 if Quarter>127
{txt}(64 real changes made)

{com}. gen SEPT=0
{txt}
{com}. replace SEPT=1 if Quarter>165
{txt}(26 real changes made)

{com}. gen Dp=0
{txt}
{com}. replace Dp=1 if Quarter==166
{txt}(1 real change made)

{com}. gen IRAQ=0
{txt}
{com}. replace IRAQ=1 if Quarter>173
{txt}(18 real changes made)

{com}. tsset Quarter
{res}{txt}{col 9}time variable:  {res}{col 25}Quarter, 1968:1 to 2007:4
{txt}{col 17}delta:  {res}1 quarter
{txt}
{com}. save REGRESSION\HIC_all.dta, replace
{txt}file REGRESSION\HIC_all.dta saved

{com}. 
{txt}end of do-file

{com}. log close
       {txt}log:  {res}graphs.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res} 9 Jan 2011, 15:04:01
{txt}{.-}
{smcl}
{txt}{sf}{ul off}